<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"
	contentType="text/html; charset=UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'da.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<meta http-equiv="content-type" content="text/html;charset=utf-8">

<link rel="stylesheet" href="js/easyui/demo/demo.css" type="text/css"></link>
<link rel="stylesheet" href="js/easyui/themes/icon.css" type="text/css"></link>
<link rel="stylesheet" href="js/easyui/themes/default/easyui.css"
	type="text/css"></link>
<script type="text/javascript" src="js/easyui/jquery-1.6.min.js"></script>
<script type="text/javascript" src="js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="script/common.js"></script>
<link href="css/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
.form-table tr td:first-child {
	width: 6em;
}
</style>
<script type="text/javascript">
	
	/**
	 *打开窗口
	 */
	function showTest(partId){  
		$("#testReport").window('open');
		var url = "procurepgetCraftsBypartId.action?partId="+partId ;
		$('#testReport').window('refresh',url);
	}
	
	/**
	 *关闭弹出看
	 */
	 function remov(){
	  $("#testReport").window('close');
	 }
</script>
</head>

<body>
	<!-- <div style="display: none;">
		工艺列表 
		<div id="testReport" class="easyui-window" title="工艺列表"
			collapsible="false" minimizable="false" maximizable="false" closed="true"  modal="true"
			style="width:820px; padding: 10px 30px;" href=""> 
		</div>  
	</div> -->
	<div align="center" style="width:70%;heidht:100%">
		<div align="center" style="padding: 10px 0px 10px 20px;">
			<div style="width:1000px; float: left;" id="suppliersList">
				<form action="productpInfo" id="productpForm" method="post">
					<div id="content_one" style="width: 50%; padding-left:40px; float: left;">
						<table class="form-table" singleSelect="true"
							data-options="singleSelect:true,collapsible:true,url:'getDetailByprocId'">
							<tr>
								<td>产品款号</td>
								<td><input class="easyui-textbox" id="productCode"
									name="ProcureProduct.productCode"
									value="${ProcureProduct.productCode}" style="height: 26px;" />
								</td>
							</tr>

							<tr>
								<td>采购数量</td>
								<td><input class="easyui-textbox" id="procCount"
									name="ProcureProduct.procCount"
									value="${ProcureProduct.procCount}" style="height:26px;" /></td>
							</tr>

							<tr>
								<td>供应商数量</td>
								<td><input class="easyui-textbox" id="suppelierCount"
									name="ProcureProduct.suppelierCount"
									value="${ProcureProduct.suppelierCount}" style="height: 26px;" />
								</td>
							</tr>

							<tr>
								<td>开始时间</td>
								<td><input class="easyui-textbox" id="startTime"
									name="ProcureProduct.startTime"
									value="${ProcureProduct.startTime}" style="height:26px;" /></td>
							</tr>

							<tr>
								<td>结束时间</td>
								<td><input class="easyui-textbox" id="endTime"
									name="ProcureProduct.endTime" value="${ProcureProduct.endTime}"
									style="height: 26px;" /></td>
							</tr>

							<tr>
								<td>交货时间</td>
								<td><input class="easyui-textbox" id="deliveryDate"
									name="ProcureProduct.deliveryDate"
									value="${ProcureProduct.deliveryDate}" style="height: 26px;" />
								</td>
							</tr>
						</table>
					</div>
					<div id="content_two" style="width:30%; float: left;">
						
						<table class="form-table add-image">
							<tr>
								<td>
									<div style="width: 50px;margin-top: -70px;">
										<a>设计图</a>
									</div>
								</td>
								<td><img style="width: 200px; height: 200px;"
									id="imgrefresh" alt="" src=""
									onerror="this.src='images/noPhoto.jpg'"></td>
							</tr>
						</table>
					</div>
				</from>
			</div>
			<div style="width:100%; float: left;" id="materialShow">
				<table class="easyui-datagrid" style="width:100%;"
					data-options="singleSelect:true,collapsible:true,url:'getDetailByprocId'">
					<thead>
						<tr>
							<th data-options="field:'partId'" width="">序号</th>
							<th data-options="field:'partCode'" width="150">部位编码</th>
							<th data-options="field:'productCode'" width="150">参考产品编码</th>
							<th data-options="field:'photo'" width="100">图示</th>
							<th data-options="field:'outCount'" width="100">工艺部位</th>
							<th data-options="field:'sizeRange'" width="100">尺寸范围</th>
							<th data-options="field:'Memo'" width="100">备注</th>
							<th data-options="field:'操作'">操作</th>
						</tr>
					</thead>
					<c:choose>
						<c:when test="">
							<tr style="text-align: center;">
								<td colspan="11"><span style="color: grey;"></span></td>
							</tr>
						</c:when>
						<c:otherwise>
							<c:forEach items="${prodplist}" var="ProductPart" varStatus="i">
								<tr>
									<td><c:out value="${i.index+1+offset*10 }" /></td>

									<td><c:out value="${ProductPart.partCode}" /></td>

									<td><c:out value="${ProductPart.productCode}" /></td>

									<td><c:out value="${ProductPart.photo}" /></td>

									<td><c:out value="${ProductPart.applicablePart.partName}" /></td>

									<td><c:out value="${ProductPart.sizeRange}" /></td>

									<td><c:out value="${ProductPart.memo}" /></td>
									
									<td>									
										<a onclick="addPanelExists('procurepgetCraftsBypartId.action?partId=${ProductPart.partId}','工艺列表')" style="text-decoration: underline;">工艺</a>
									</td>
								</tr>
							</c:forEach>
						</c:otherwise>
					</c:choose>
				</table>
			</div>

		</div>
		<div style="margin: 10px 0px;">
			<a onclick="removeCurrentPanel('productpDetail.jsp','采购需求详情')"
				class="easyui-linkbutton" style="margin-left: 10px;">确定</a>
		</div>
	</div>
</body>
</html>
